package com.yanzhenjie.andserver.sample.handler.anjian;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2018/2/14.
 */

public class GetRunPermHandler extends ProxyHandler {

    protected void resolve(JSONObject json){
        try {
            JSONObject data = json.optJSONObject("data");
            if(null == data){
                return;
            }
            JSONObject RunPerm = data.optJSONObject("RunPerm");
            RunPerm.putOpt("Run",true);
            RunPerm.putOpt("TryExpired",false);
            data.putOpt("IsShowMsg",false);
            data.putOpt("IsTmpAccount",false);
            data.putOpt("HeartbeatInterval",600000);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
